package com.geekaca.news.service.impl;

import com.geekaca.news.domain.AdminUser;
import com.geekaca.news.mapper.AdminUserMapper;
import com.geekaca.news.service.AdminUserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Repository;
import org.springframework.stereotype.Service;

@Service
public class AdminUserServiceImpl implements AdminUserService {
    @Autowired(required = false)
    private AdminUserMapper adminUserMapper;

    @Override
    public AdminUser login(AdminUser adminUser) {
        AdminUser adminUser2 = adminUserMapper.selectLoginUser(adminUser);
        return adminUser2;
    }
    @Override
    public int updateProfile(AdminUser adminUser) {
        return adminUserMapper.updateByPrimaryKey(adminUser);
    }

    @Override
    public int getPasswd(Integer loginUserId, String password) {
        return adminUserMapper.selectByPassId(loginUserId,password);
    }
}
